package systems;

import models.ServiceConfigModel;
import models.SiteConfigModel;
import entities.ServiceConfig;
import entities.SiteConfig;

public class ConfigSystem {
    private static SiteConfig configs = null;
    
    private static ServiceConfig serviceConfigs = null;
    
    public static SiteConfig getConfigs() {
        if (configs == null) {
            SiteConfigModel sModel = SiteConfigModel.getInstance();
            setConfigs(sModel.getConfig(1));
        }
        return configs;
    }

    public static void setConfigs(SiteConfig configs) {
        ConfigSystem.configs = configs;
    }
    
    public static ServiceConfig getServiceConfigs() {
		if (serviceConfigs == null) {
			ServiceConfigModel sModel = ServiceConfigModel.getInstance();
			setServiceConfigs(sModel.getConfig(1));
		}
		return serviceConfigs;
	}
    
    public static void setServiceConfigs(ServiceConfig serviceConfigs) {
		ConfigSystem.serviceConfigs = serviceConfigs;
	}
}
